﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Yto.Threading
{
    public class BaseRunnable : IRunnable
    {
        private volatile bool _isRunning;

        public bool IsRunning { get { return _isRunning; } }

        public virtual void Start()
        {
            _isRunning = true;
        }

        public virtual void Stop()
        {
            _isRunning = false;
        }

        public virtual void Wait2Stop()
        {
        }
    }
}
